\begin{tikzpicture}

	\begin{timelinediagram}

		\renewcommand{\timestepvector}{0,-0.8}

		% initial timelines

		\path (0,0) node (timelineanchor) {};
		\newtimeline{client}
		\path (client) node[above=2pt, align=center] (clientlabel) {\normalsize Client\\};
	
		\path (2.5,0) node (timelineanchor) {};
		\newtimeline{servermain}
		\path (servermain) node[above=2pt, align=center] (serverlabel) {\normalsize Server\\};
	
		\path (timelineanchor)+(10,0) node (timelineanchor) {};
		\newtimeline{corecap}
		\path (corecap) node[above=2pt, align=center] (corecaplabel) {\normalsize Core\\PD};

		\activate{servermain}
		\activate{client}

		% timelines for entrypoint and object pool

		\path (servermain)+(2.5,0) node (timelineanchor) {};
		\newtimeline{serverep}
		\node[draw, fill=white, align=center, dropshadow] at (serverep) (ep) {Entrypoint};

		\path (serverep)+(2.5,0) node (timelineanchor) {};
		\newtimeline{serverobjpool}
		\node[draw, fill=white, align=center, dropshadow] at (serverobjpool) (objpool) {Object\\pool};
		\timestep

		% create RPC object

		\path (serverobjpool)+(2.5,0) node (timelineanchor) {};
		\newtimeline{serverrpcobj}
		\node[draw, fill=white, align=center, dropshadow] at (serverrpcobj) (rpcobj) {RPC object\\ \textbf{a}};
		\draw[timelinemessage, dashed] (servermain) -- node[above] {$create$} (rpcobj);
		\timestep

		% manage RPC object

		\transition{servermain}{serverep}{manage \textbf{a}}
		\timestep
		\transition{serverep}{corecap}{allocate capability}
		\timestep
		\transition{corecap}{serverep}{return capability \textbf{$cap_a$}}
		\timestep
		\transition{serverep}{serverobjpool}{}
		\node[align=center] at (transitionlabel) {associate \\ {\textbf{a}} with \textbf{$cap_a$}};
		\timestep
		\transition{serverobjpool}{serverep}{}
		\timestep
		\transition{serverep}{servermain}{}
		\node[align=center] at (transitionlabel) {return \\ \textbf{$cap_a$}};
		\timestep

		% delegate capability to client
		\draw[timelinemessage, dashed] (servermain) --
			node[align=center] {$delegate$ \\ \textbf{$cap_a$}}
			(client);
		\timestep

	\end{timelinediagram}

	\begin{scope}[on background layer]
	\node[timelinegroup, fit=(serverlabel)  (serverrpcobj) (rpcobj)] {};
	\node[timelinegroup, fit=(clientlabel)  (client)] {};
	\node[timelinegroup, fit=(corecaplabel) (corecap)] {};
	\end{scope}

\end{tikzpicture}
